package com.beans;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.UUID;

/**
 * @author 李琦 on 2021/10/20.
 * @version java version "1.8.0_301" 2021-04-20
 */
@Data//为该类所有属性生成get set等常用方法lombok
@Entity
@Table(name="userinfo")//数据库表的名称.需要申明主键@ID

public class Userinfo implements Serializable {

    //序列化
    private static final long serivalVersionUID=1L;//可以更快加载,可有可无

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)//主键增长策略,主键有数据库自动生成,hibernate主键生成策略
    private int id;

    private String name;
    private String password;
    private int age;
    private String aclass;




}
